package com.alibaba.nacos.config.server.jpa.repository;

import java.time.LocalDateTime;

import com.alibaba.nacos.config.server.jpa.entity.AppConfigdataRelationSubsEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * The type of nacos-all.
 *
 * @author 问道于盲
 * @date 2020-03-12
 */
@Repository
public interface AppConfigdataRelationSubsRepository extends BaseRepository<AppConfigdataRelationSubsEntity, Long> {

    @Query("update AppConfigdataRelationSubsEntity " +
        "set gmtModified = :gmtModified " +
        "where " +
        "dataId = :dataId and groupId = :groupId and appName = :appName")
    void updateData(String dataId, String groupId, String appName, LocalDateTime gmtModified);
}
